<?php 

include_once("Controller.inc.php");

 
class Modules_Core_Core extends Modules_Common_Modules
{
	
	public function __construct()
	{
		$this->Name="Core";	
	}
	public function Init()
	{
		
		if(!isset($_SESSION['id']))
		{
			Controller::showView(new View(new Modules_Core_View_Login()),new Model(new Modules_Core_Model_Login()));
			die();
		}
		$user=new Modules_Common_DB_Users($_SESSION['id']);
		if($user->LastWorkspace==-1)
		{
			$acr=new Modules_Workspace_Workspace();

			$acr->Init();
			die();
		}
		$ctrl=Controller::showView(new View(new Modules_Core_View_Dashboard()),new Model(new Modules_Core_Model_Dashboard()));
		$ctrl->user=$user;
	}
	
}
?>
